<%-- 
    Document   : searchsales
    Created on : Nov 17, 2012, 4:29:26 PM
    Author     : Ahsan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="ca.trader.utils.UIUtils"%>
<%@page import="ca.trader.utils.HttpConsts"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<%
	 pageContext.setAttribute("CategoryList", UIUtils.getCategoryList());
	 pageContext.setAttribute("CountryList", UIUtils.getCountryList());
%>
<html>
    <head>
        <jsp:include page="head.jsp" />
        <title>JSP Page</title>
    </head>
    <body>
	<div id="searchSalesPage">

	    <form action="<%= HttpConsts.SEARCH_QUERY_JSP_PAGE%>" method="get">
		<table>
		    <input type="hidden" name="page" value="1" />
		    <tr>
			<td>Keywords</td>
			<td><input id="keywords" type="text" name="keywords" value=""/></td>
			
			    <td>Leave empty if you don't want to restrict results by keywords</td>
		    </tr>
		    <tr class="locationSetRow">			    
			    <td id="country_label">Country</td>
			    
			    <td><select name="country" id="country_dropdown" > 
				    <option></option>
				    <c:forEach var="i" items="${CountryList}">
					<option><c:out value="${i.countryName}"/></option>
				    </c:forEach>
				</select>
			    </td>
			    <td>Leave empty if you don't want to restrict results by country</td>
			</tr>
			<tr class="locationSetRow">
			    <td id="region_label">Region</td>
			    <td><select name="region" id="region_dropdown">
			    
				</select>
			    </td>
			    <td>Leave empty if you don't want to restrict results by region</td>
			</tr>
			<tr class="locationSetRow">
			    <td id="city_label">City</td>
			    <td><select name="city" id="city_dropdown">
			    
				</select>
			    </td>
			    <td>Leave empty if you don't want to restrict results by city</td>
			</tr>
		    <tr>
			<td>Category</td>
			<td><select name="categories" id="categories" multiple="multiple">
				<c:forEach var="i" items="${CategoryList}">
				    <option><c:out value="${i.name}"/></option>
				</c:forEach>
			    </select>
			    
			</td>
			<td>Leave empty if you don't want to restrict results by category</td>
		    </tr>
		    <tr>
			<!-- <tr>
			     <td>Password</td>
			     <td><input  id="password" type="password" name="password"/></td>
			 </tr>
			 <tr>
			     <td>Remember me:</td>
			     <td><input  id="remember_me" type="checkbox" name="remember" value="true"/></td>
			 </tr>
			 <tr>
			     <td colspan="2" align="center"> <input id="user_login_button" type="submit" value="Login"/>
			     </td>
			 </tr> -->
		    <tr>
			<td colspan="2" align="center"> <input id="searchSaleSubmit" type="submit" value="Search"/>
			</td>
		    </tr>
		</table>

	    </form>
	</div>

        <jsp:include page="footer.jsp" />
    </body>

</html>
